package com.atguigu.day15.homework.h2;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/19 8:47
 * @注释
 */
public enum Status {
    FREE("空闲"),
    USED("在用"),
    SCRAP("报废");
    private final String description;
    private final int value;
    Status(String description) {
        this.value = ordinal();
        this.description = description;
    }

    @Override
    public String toString() {
        return description;
    }
    public static Status getByValue(int value) {
        return Status.values()[value];
    }
}
